﻿@model PaymentApply 
<fieldset>
    <legend>@Html.DisplayNameFor(m => m.BankData)</legend>
    @Html.DisplayFor(m => m.BankData)
</fieldset>
<fieldset>
    <legend>@Html.DisplayNameFor(m => m)</legend>
    @Html.DisplayForModel()
</fieldset>
<fieldset>
    <legend>附加信息</legend>
    <table class="table">
        <tr>
            <td style="font-size: 14px">
                文件名
            </td>
            <td style="font-size: 14px;">
                操作
            </td>
        </tr>
        <tbody id="fileList">
            @if (Model.PaymentAttachs != null && Model.PaymentAttachs.Count > 0)
            {
                foreach (var item in Model.PaymentAttachs)
                { <tr>
                    <td>
                        @Html.DisplayFor(s => item.FileName)
                    </td>
                    <td>
                        @Html.ActionLink("下载", "Download", new { Id = item.Id, controller = "PaymentAttach" })
                    </td>
                </tr>
                }
            }
        </tbody>
    </table>
    @if (User.IsInRole("FINACE"))
    { //财务
        <div style="clear: both;">
        </div>
        <fieldset style="height: 100px; padding-top: 20px;">
            <legend>附件上传</legend>
            <input type='file' id='upload' name='upload' />
            <span style='padding: 0px 10px; text-align: center'>
                <img src='@Url.Content("~/Content/img/loading.gif")' id='fileloading' style='display: none;' /></span>
            <input type='button' value='上传' class="btn btn-primary" onclick="Upload('@Url.Action("UploadFile", new {Model.Id })');" />
            <span id='uploadresult' style='padding: 0px 5px;'>文件未上传</span>
        </fieldset>
        @Html.Js("ajaxfileupload")
    }
</fieldset>
 